<template>
    <div class="item2">
        <div class="item2_img_wapper">
<!--            <el-image style="width: 223px; height: 170px" :src="filterImgAddr" fit="fit" class="item2_img">-->
<!--                <template #error>-->
<!--                    <img style="width: 223px; height: 170px" src="https://img2.baidu.com/it/u=3666548066,2508071679&fm=26&fmt=auto" >-->
<!--                </template>-->
<!--            </el-image>-->
            <img v-if="data.smallPicUrl != null" :src="filterImgAddr" class="img">
            <img v-else src="https://img2.baidu.com/it/u=3666548066,2508071679&fm=26&fmt=auto" class="img">
        </div>

        <div class="item2_content">
            <div class="item2_title">{{data.title}}</div>
            <div class="item2_content_message">{{data.description}}</div>
            <div class="item2_time">
                <i class="iconfont icon-shijian"></i> {{data.createTime.split(' ')[0]}}
            </div>
        </div>

    </div>
</template>

<script>
    import baseConfig from "@/utils/config";
    export default {
        name: "item2",
        props:{
            data:{
                type:Object,
                default:{},
            }
        },
        computed:{
          filterImgAddr(){
              return baseConfig.dev+this.data.smallPicUrl
          }
        },
        data(){

        },
    }
</script>

<style scoped>
    .item2{
        width: 100%;
        height: 220px;
        margin-top: 20px;
        display: flex;
        background: #ffffff;
    }
    .item2_img_wapper{
        width: 223px;
        height: 170px;
        margin-top: 25px;
    }
    .img{
        width: 223px;
        height: 170px;
        object-fit: fill;
        margin-left: 20px;
    }
    .item2_img{
        margin-left: 20px;
    }
    .item2_title{

        font-size: 18px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #333333;
        margin-top: 40px;

      overflow: hidden;
      text-overflow:ellipsis;
      white-space: nowrap;
    }
    .item2_content{
        margin-left: 40px;
        position: relative;
        margin-right: 20px;
    }
    .item2_content_message{
        font-size: 14px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #A3A3A3;
        line-height: 24px;

        margin-top: 10px;

        /*多行文本溢出省略号*/
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }
    .item2_time{
        font-size: 12px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #A3A3A3;
        line-height: 18px;

        position: absolute;
        bottom: 36px;
    }
</style>
